package com.tour.sic.service.impl;

import com.tour.sic.entity.Smslog;
import com.tour.sic.dao.SmslogDao;
import com.tour.sic.service.intf.SmslogService;
import com.tour.sic.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: SIC
 * @description: 业务接口实现层
 * @author: team
 * @create: 2021-04-22 16:25:00
 */
@Service
public class SmslogServiceImpl implements SmslogService{
    /*
    *注入持久层对象*/
    @Autowired
    private SmslogDao dao;
    /*
    * 新增内容*/
    @Override
    public R save(Smslog smslog) {
        if(smslog!=null){
            if(dao.insert(smslog)>0){
                return R.ok();
            }
        }
        return R.fail("新增异常");
    }
    /*
    * 查询 所有数据*/
    @Override
    public R queryAll() {
        return R.ok(dao.selectAll());
    }
}